home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / thinkref / archive / THINKPascalUH2.1.sea / THINKPas Univ Hdr 2.1 / Interfaces / ADSPSecure.p < prev    next >
Text File  |  1995-09-14  |  4KB  |  103 lines

  1. { Converted with MPW2TPas Tuesday, September 12, 1995 5:06:41 PM }
  2. {}
  3. {     File:        ADSPSecure.p}
  4. { }
  5. {     Contains:    Secure AppleTalk Data Stream Protocol Interfaces.}
  6. { }
  7. {     Version:    Technology:    AOCE Toolbox 1.02}
  8. {                 Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18}
  9. { }
  10. {     Copyright:    © 1984-1995 by Apple Computer, Inc.}
  11. {                 All rights reserved.}
  12. { }
  13. {     Bugs?:        If you find a problem with this file, use the Apple Bug Reporter}
  14. {                 stack.  Include the file and version information (from above)}
  15. {                 in the problem description and send to:}
  16. {                     Internet:    apple.bugs@applelink.apple.com}
  17. {                     AppleLink:    APPLE.BUGS}
  18. { }
  19. {}
  20.  
  21. unit ADSPSecure;
  22. interface
  23.  
  24.  
  25. {$IFC UNDEFINED __ADSPSECURE__}
  26. {$SETC __ADSPSECURE__ := 1}
  27.  
  28.     uses
  29.         ConditionalMacros, Types, Events, Notification, AppleTalk, Processes, PPCToolbox, EPPC, Files, Aliases, AppleEvents, ADSP, OCE, OCEAuthDir;
  30.  
  31. { $PUSH}
  32. { $ALIGN MAC68K}
  33. { $LibExport+}
  34.  
  35.     const
  36.         sdspOpen = 229;
  37.  
  38. {}
  39. {For secure connections, the eom field of ioParams contains two single-bit flags}
  40. {(instead of a zero/non-zero byte). They are an encrypt flag (see below), and an}
  41. {eom flag.  All other bits in that field should be zero.}
  42. {}
  43. {To write an encrypted message, you must set an encrypt bit in the eom field of}
  44. {the ioParams of your write call. Note: this flag is only checked on the first}
  45. {write of a message (the first write on a connection, or the first write following}
  46. {a write with eom set.}
  47. {}
  48.         dspEOMBit = 0;                            { set if EOM at end of write }
  49.         dspEncryptBit = 1;                            { set to encrypt message }
  50.  
  51.         dspEOMMask = $1;
  52.         dspEncryptMask = $2;
  53.  
  54.         sdspWorkSize = 2048;
  55.  
  56.  
  57.     type
  58.         TRSecureParams = record
  59.                 localCID: INTEGER;                                { local connection id }
  60.                 remoteCID: INTEGER;                                { remote connection id }
  61.                 remoteAddress: AddrBlock;                                { address of remote end }
  62.                 filterAddress: AddrBlock;                                { address filter }
  63.                 sendSeq: LONGINT;                                { local send sequence number }
  64.                 sendWindow: INTEGER;                                { send window size }
  65.                 recvSeq: LONGINT;                                { receive sequence number }
  66.                 attnSendSeq: LONGINT;                                { attention send sequence number }
  67.                 attnRecvSeq: LONGINT;                                { attention receive sequence number }
  68.                 ocMode: SInt8; { unsigned char }
  69.                 { open connection mode }
  70.                 ocInterval: SInt8; { unsigned char }
  71.                 { open connection request retry interval }
  72.                 ocMaximum: SInt8; { unsigned char }
  73.                 { open connection request retry maximum }
  74.                 secure: BOOLEAN;                                {  --> TRUE if session was authenticated }
  75.                 sessionKey: AuthKeyPtr;                                { <--> encryption key for session }
  76.                 credentialsSize: LONGINT;                                {  --> length of credentials }
  77.                 credentials: Ptr;                                    {  --> pointer to credentials }
  78.                 workspace: Ptr;                                    {  --> pointer to workspace for connection}
  79. {                                           align on even boundary and length = sdspWorkSize }
  80.                 recipient: AuthIdentity;                            {  --> identity of recipient (or initiator if active mode }
  81.                 issueTime: UTCTime;                                {  --> when credentials were issued }
  82.                 expiry: UTCTime;                                {  --> when credentials expiry }
  83.                 initiator: RecordIDPtr;                            { <--  RecordID of initiator returned here.}
  84. {                                            Must give appropriate Buffer to hold RecordID}
  85. {                                            (Only for passive or accept mode) }
  86.                 hasIntermediary: BOOLEAN;                                { <--  will be set if credentials has an intermediary }
  87.                 filler1: BOOLEAN;
  88.                 intermediary: RecordIDPtr;                            { <--  RecordID of intermediary returned here.}
  89. {                                            (If intermediary is found in credentials}
  90. {                                            Must give appropriate Buffer to hold RecordID}
  91. {                                            (Only for passive or accept mode) }
  92.             end;
  93.  
  94.  
  95. { $ALIGN RESET}
  96. { $POP}
  97.  
  98. {$ENDC}
  99.  {__ADSPSECURE__}
  100.  
  101. implementation
  102. end.
  103.